package net.yambal.android.secretary_alarm.manager;

import java.util.ArrayList;
import java.util.List;
import net.yambal.android.secretary_alarm.voice.IVoiceBuilder;
import android.content.Context;
import android.util.Log;

public class VoiceBuildManager{
	private static VoiceBuildManager _my_instance = null;
	public VoiceBuildManager(Context context) {
	}
	
	synchronized static
	public VoiceBuildManager getInstance( Context context){
		if ( _my_instance == null ){
			_my_instance = new VoiceBuildManager( context.getApplicationContext());
		}
		return _my_instance;
	}
	
	// buildAlarmVoice ****************************************
	public List<IVoiceBuilder> buildAlarmVoice(List<IVoiceBuilder> voice_builders){
		_builded_voice_builders = new ArrayList<IVoiceBuilder>();
		
		while(voice_builders.size() != 0){
			IVoiceBuilder builder = voice_builders.remove(0);
			Log.w("sa", "VoiceManager.buildAlarmVoice:" + builder.getSharedPreferencesVoiceFileKey());
			_builded_voice_builders.add(builder.build());
		}
		
		return _builded_voice_builders;
	}

	private List<IVoiceBuilder> _builded_voice_builders;
}
